package com.hdoit.ares.web.insu.modelconfig;

import com.hdoit.ares.web.insu.providers.InsuranceStateProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      caochengmeng
 * @email       
 * @createtime  2017年11月04日 10:30:52
 * @comment
 */
public class InsurancePeopleConfig extends ModelMetadataAttributeConfiguration{
    public InsurancePeopleConfig(){
        this.setProperty("name")
            .hasAttribute(new DisplayNameAttribute("名称"))
            .hasAttribute(new RequiredAttribute("名称为必填项"));

        this.setProperty("age")
            .hasAttribute(new DisplayNameAttribute("年龄段"));

        this.setProperty("state")
            .hasAttribute(new DisplayNameAttribute("状态"))
            /*.hasAttribute(new RequiredAttribute("状态为必填项"));*/
            .hasAttribute(new DropDownListAttribute(new InsuranceStateProvider()));

        this.setProperty("icon")
            .hasAttribute(new DisplayNameAttribute("图标"));
            /*.hasAttribute(new RequiredAttribute("图标为必填项"));*/

        this.setProperty("createManagerName")
            .hasAttribute(new DisplayNameAttribute("创建人姓名"));

        this.setProperty("modifyManagerName")
            .hasAttribute(new DisplayNameAttribute("修改人姓名"));

        this.setProperty("code")
            .hasAttribute(new DisplayNameAttribute("按字母搜索"));

        this.setProperty("markCode")
            .hasAttribute(new DisplayNameAttribute("按汉字搜索"));

    }
}